<?xml version="1.0" encoding="UTF-8"?>    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:util="http://java.sun.com/jsf/composite/components/util">
<f:view locale="#{localBean.locale}">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
</h:head>
<h:body>
	<h:outputScript name="jsf.js" library="javax.faces" target="body"/>
		 <ui:composition template="/WEB-INF/templates/manage/manageTemplate.xhtml">
		 	<ui:define name="manageContent">
		 		<h:form id="editGoodsForm">
			 		<div class="main_col">
			 		<h1>#{msgs['menu.manage.goods.display']}>#{msgs['menu.manage.create.display']}</h1>
			 		<div class="main_content">
			 			<rich:panel id="maindatapanel" styleClass="rf-p-none-border" headerClass="rf-p-hdr-none-border" bodyClass="rf-p-b-none-border">
							<h:panelGrid columns="4" border="0" cellpadding="0" cellspacing="0" styleClass="edit-goods-panelgrid" rowClasses="edit-goods-panelgrid-odd-row,edit-goods-panelgrid-even-row" columnClasses="edit-goods-panelgrid-of-first,edit-goods-panelgrid-of-second,edit-goods-panelgrid-of-first,edit-goods-panelgrid-of-second"  style="border:none">
								<f:facet name="header">
									<h:panelGroup>
										<h:messages id="validateErrorMessages" styleClass="errormessage"></h:messages>
										<util:messages errorMessages="#{createGoodsPage.errorMessages }"/>
									</h:panelGroup>
								</f:facet>
								<h:outputLabel value="#{msgs['product.code.display']}：" styleClass="normallabel" for="code"></h:outputLabel><h:inputText id="code" value="#{createGoodsPage.goods.code}" label="#{msgs['product.code.display']}" required="true" styleClass="normal_input_text" maxlength="20"><f:validateLength minimum="6" maximum="20"/><f:ajax event="blur" listener="#{createGoodsPage.codeKeyUp}" execute="@this" render="imageName introduceFileName"></f:ajax></h:inputText>
								<h:outputLabel value="#{msgs['product.name.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="name" value="#{createGoodsPage.goods.name}" styleClass="normal_input_text" maxlength="50"></h:inputText>
								<h:outputLabel value="#{msgs['product.barcode.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="barcode" value="#{createGoodsPage.goods.barcode}" styleClass="normal_input_text" maxlength="50"></h:inputText>
								
								<h:outputLabel value="#{msgs['product.provider.display']}：" styleClass="normallabel"></h:outputLabel><h:selectOneMenu id="provider" value="#{createGoodsPage.goods.providerv.stakeholderId}" styleClass="defaultSelect"><f:selectItems value="#{existStakeholder.stakeholderItems}"></f:selectItems></h:selectOneMenu>
								<h:outputLabel value="#{msgs['product.manufacturerCode.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="manufacturerCode" value="#{createGoodsPage.goods.manufacturerCode}" label="#{msgs['product.manufacturerCode.display']}" required="true" styleClass="normal_input_text"><f:validateLength minimum="6" maximum="20"/></h:inputText>
								
								<h:outputLabel value="#{msgs['product.stockLowerNumber.display']}：" styleClass="normallabel"></h:outputLabel><p:spinner id="stockLowerNumber" value="#{createGoodsPage.goods.stockLowerNumber}" style="border:1px solid #999999;font-size:14px;padding-top:4px;padding-bottom:4px;height:16px;*height:26px;line-height: 17px;width:80px;" min="10" max="10000" stepFactor="1"></p:spinner>
								<h:outputLabel value="#{msgs['product.currentNumber.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="currentNumber" value="#{createGoodsPage.goods.currentNumber}" styleClass="normal_input_text"><f:validateLongRange minimum="1" maximum="100000"></f:validateLongRange></h:inputText>
								<h:outputLabel value="#{msgs['product.stockUpperNumber.display']}：" styleClass="normallabel"></h:outputLabel><p:spinner id="stockUpperNumber" value="#{createGoodsPage.goods.stockUpperNumber}" style="border:1px solid #999999;font-size:14px;padding-top:4px;padding-bottom:4px;height:16px;*height:26px;line-height: 17px;width:80px;" min="10" max="10000" stepFactor="1"></p:spinner>
								
								<h:outputLabel value="#{msgs['product.unit.display']}：" styleClass="normallabel"></h:outputLabel><h:selectOneMenu id="unit" value="#{createGoodsPage.goods.unitv.unitId}" styleClass="defaultSelect"><f:selectItems value="#{existProductUnit.unitItems}"></f:selectItems></h:selectOneMenu>
								<h:outputLabel value="#{msgs['product.spec.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="spec" value="#{createGoodsPage.goods.spec}" styleClass="normal_input_text" maxlength="50"></h:inputText>
								<h:outputLabel value="#{msgs['product.imageName.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="imageName" value="#{createGoodsPage.goods.imageName}" styleClass="normal_input_text" maxlength="50" readonly="true"></h:inputText>
								<h:outputLabel value="#{msgs['product.introduceFileName.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="introduceFileName" value="#{createGoodsPage.goods.introduceFileName}" styleClass="normal_input_text" maxlength="50" readonly="true"></h:inputText>
								<h:outputLabel value="#{msgs['product.description.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="description" value="#{createGoodsPage.goods.description}" styleClass="normal_input_text" maxlength="200"></h:inputText>
								<h:outputLabel value="#{msgs['product.primaryCategoryCode.display']}：" styleClass="normallabel"></h:outputLabel><h:selectOneMenu id="primaryCategoryCode" valueChangeListener="#{createGoodsPage.changePrimaryCategoryItems}" value="#{createGoodsPage.goods.primaryCategoryCode}" styleClass="defaultSelect"><f:selectItems value="#{existCategory.categoryItems}"></f:selectItems><f:ajax event="change" execute="@this" render="maindatapanel mainSpecialPanel"></f:ajax></h:selectOneMenu>
								<h:outputLabel value="#{msgs['product.brandCode.display']}：" styleClass="normallabel"></h:outputLabel><h:selectOneMenu id="brandCode" value="#{createGoodsPage.goods.brandCode}" styleClass="defaultSelect"><f:selectItem itemValue="" itemLabel="#{msgs['select.display']}"/><f:selectItems value="#{existBrand.brandItems}"></f:selectItems></h:selectOneMenu>
								<h:outputLabel value="#{msgs['product.status.display']}：" styleClass="normallabel"></h:outputLabel><h:selectOneMenu id="status" value="#{createGoodsPage.goods.status}" styleClass="defaultSelect"><f:selectItems value="#{existProductStatus.statusItems}"></f:selectItems></h:selectOneMenu>
								<h:outputLabel value="#{msgs['product.purchasePrice.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="purchasePrice" value="#{createGoodsPage.goods.purchasePrice}" styleClass="normal_input_text"><f:validateDoubleRange minimum="0.01" maximum="9999999.99"></f:validateDoubleRange></h:inputText>
								<h:outputLabel value="#{msgs['product.tradePriceOne.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="tradePriceOne" value="#{createGoodsPage.goods.tradePriceOne}" styleClass="normal_input_text"><f:validateDoubleRange minimum="0.01" maximum="9999999.99"></f:validateDoubleRange></h:inputText>
								<h:outputLabel value="#{msgs['product.tradePriceTwo.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="tradePriceTwo" value="#{createGoodsPage.goods.tradePriceTwo}" styleClass="normal_input_text"><f:validateDoubleRange minimum="0.01" maximum="9999999.99"></f:validateDoubleRange></h:inputText>
								<h:outputLabel value="#{msgs['product.retailPrice.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="retailPrice" value="#{createGoodsPage.goods.retailPrice}" styleClass="normal_input_text"><f:validateDoubleRange minimum="0.01" maximum="9999999.99"></f:validateDoubleRange></h:inputText>
								<h:outputLabel value="#{msgs['product.integration.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="integration" value="#{createGoodsPage.goods.integration}" styleClass="normal_input_text"><f:validateLongRange minimum="1" maximum="10000"></f:validateLongRange></h:inputText>
								<h:outputLabel value="#{msgs['product.integration.display']}：" styleClass="normallabel"></h:outputLabel><h:selectManyCheckbox id="showOn" value="#{createGoodsPage.showOn}"><f:selectItems value="#{existShowOn.showOnItems}"></f:selectItems></h:selectManyCheckbox>
							</h:panelGrid>
							<a4j:outputPanel id="mainSpecialPanel">
								<h:panelGrid id="importFruitSpecialPanel" columns="4" border="0" cellpadding="0" cellspacing="0" styleClass="edit-goods-panelgrid" rowClasses="edit-goods-panelgrid-odd-row,edit-goods-panelgrid-even-row" columnClasses="edit-goods-panelgrid-of-first,edit-goods-panelgrid-of-second,edit-goods-panelgrid-of-first,edit-goods-panelgrid-of-second" rendered="#{('importfruit' eq createGoodsPage.goods.primaryCategoryCode) }">
									<h:outputLabel value="#{msgs['product.subCategoryCode.display']}：" styleClass="normallabel"></h:outputLabel><h:selectOneMenu id="importfruitSubCategory" value="#{createGoodsPage.goods.sfield1}" styleClass="defaultSelect"><f:selectItem itemValue="" itemLabel="#{msgs['select.display']}"/><f:selectItems value="#{existFruitCategory.categoryItems}"></f:selectItems></h:selectOneMenu>
									<h:outputLabel value="#{msgs['goods.origine.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="importfruitOrigine" value="#{createGoodsPage.goods.sfield2}" styleClass="normal_input_text"></h:inputText>
								</h:panelGrid>
								<h:panelGrid id="homeMadefruitSpecialPanel" columns="4" border="0" cellpadding="0" cellspacing="0" styleClass="edit-goods-panelgrid" rowClasses="edit-goods-panelgrid-odd-row,edit-goods-panelgrid-even-row" columnClasses="edit-goods-panelgrid-of-first,edit-goods-panelgrid-of-second,edit-goods-panelgrid-of-first,edit-goods-panelgrid-of-second" rendered="#{('homemadefruit' eq createGoodsPage.goods.primaryCategoryCode) }">
									<h:outputLabel value="#{msgs['product.subCategoryCode.display']}：" styleClass="normallabel"></h:outputLabel><h:selectOneMenu id="homemadefruitSubCategory" value="#{createGoodsPage.goods.sfield1}" styleClass="defaultSelect"><f:selectItem itemValue="" itemLabel="#{msgs['select.display']}"/><f:selectItems value="#{existFruitCategory.categoryItems}"></f:selectItems></h:selectOneMenu>
									<h:outputLabel value="#{msgs['goods.origine.display']}：" styleClass="normallabel"></h:outputLabel><h:inputText id="homemadefruitOrigine" value="#{createGoodsPage.goods.sfield2}" styleClass="normal_input_text"></h:inputText>
								</h:panelGrid>
							</a4j:outputPanel>
						</rich:panel>
						
							
						<h:outputLabel value="#{createGoodsPage.displayMessage}"></h:outputLabel>
						<h:commandLink action="#{createGoodsPage.saveGoods}"   styleClass="defaultbutton"><f:verbatim>#{msgs['button.save.display'] }</f:verbatim></h:commandLink>
				
					</div>
				</div>
			</h:form>
			
					
					
	 	</ui:define>
 		<ui:define name="popuppanel">
	 		
	 			
			
	 	</ui:define>
	 </ui:composition>
</h:body>
</f:view>
</html>
